<!doctype html>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp"%>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>山东省自然资源厅</title>
    <meta name="description" content="">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="${ctxStatic}/sdlyfp/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="${ctxStatic}/sdlyfp/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="${ctxStatic}/sdlyfp/css/amazeui.min.css" />
    <link rel="stylesheet" href="${ctxStatic}/sdlyfp/css/admin.css">
    <link rel="stylesheet" href="${ctxStatic}/sdlyfp/css/app.css">
    <script src="${ctxStatic}/sdlyfp/js/echarts.min.js"></script>
</head>

<body data-type="index">
    
	<!-- head -->
	<jsp:include page="head.jsp" flush="false"></jsp:include>

    <div class="tpl-page-container tpl-page-header-fixed">
    
	<!-- 菜单 -->
	<jsp:include page="menu.jsp" flush="false"></jsp:include>


        <div class="tpl-content-wrapper">
            <div class="tpl-content-page-title">
            <c:if test="${fns:getUser().area.type lt 3}">
            	全省
            </c:if>
            <c:if test="${fns:getUser().area.type gt 2}">
            	${fns:getUser().name}
            </c:if>
            
            	工作进度
            
            <c:if test="${fns:getUser().area.type gt 2}">
            	&nbsp;<font style="font-size: 17px;" color="red"><b>温馨提示：</b>
            	顶部四项进度为登录账号所在单位的完成进度；中间部分列表为下级单位的各项完成进度，括号
            	内为进度，括号左侧数字为当前完成量，不论是地市、区县，当<b>任务目标</b>或者<b>完成量</b>为0时，进度都为0%；
            	任务目标的设置方法：点击左侧的菜单“区域设置”，找到对应单位点击“修改”,输入各项任务目标“保存”即可。
            	<b>注意</b>任务目标的填写非常重要，必须按照实际目标量填写（任务目标不确定时填数字0），否则将导致进度统计错误。</font>
            </c:if>
            	
            </div>
            <ol class="am-breadcrumb">
                <!-- <li><a href="#" class="am-icon-home">首页</a></li>
                <li><a href="#">分类</a></li>
                <li class="am-active">内容</li> -->
            </ol>
            <!-- <div class="tpl-content-scope">
                <div class="note note-info">
                    <h3>全省林业地市扶贫统计
                        <span class="close" data-close="note"></span>
                    </h3>
                    <p>济南市、威海市、烟台市经济扶贫林任务完成；菏泽市、临沂市护林员扶贫任务完成；临沂市、德州市、滨州市企业扶贫任务完成；烟台市林业技术扶贫完成</p>
                    <p><span class="label label-danger">提示:</span> 聊城市经济扶贫完成进度不足20%;菏泽护林员扶贫任务完成进度不足20%
                    </p>
                </div>
            </div> -->
            <div class="row">
                <div class="am-u-lg-3 am-u-md-6 am-u-sm-12">
                    <div class="dashboard-stat blue" title="点击查看详情">
                        <div class="visual">
                            <i class="am-icon-comments-o"></i>
                        </div>
                        <div class="details">
                            <div class="number"><font style="font-size: 30px;">已完成</font> ${empty forestTotalRate.forestRate ? '0':forestTotalRate.forestRate}%</div>
                            <div class="desc"> 经济林产业扶贫：面积 </div>
                        </div>
                        <a class="more" href="${ctx }/gt/gtForest?menuId=forest"> 查看详细
		                    <i class="m-icon-swapright m-icon-white"></i>
		                </a>
                    </div>
                </div>
                <div class="am-u-lg-3 am-u-md-6 am-u-sm-12" title="点击查看详情">
                    <div class="dashboard-stat red">
                        <div class="visual">
                            <i class="am-icon-bar-chart-o"></i>
                        </div>
                        <div class="details">
                            <div class="number"><font style="font-size: 30px;">已完成</font> ${empty forestTotalRate.peopleRate ? '0':forestTotalRate.peopleRate}% </div>
                            <div class="desc">经济林产业扶贫：帮扶带动贫困人口 </div>
                        </div>
                        <a class="more" href="${ctx }/gt/gtForest?menuId=forest"> 查看详细
                    	<i class="m-icon-swapright m-icon-white"></i>
                		</a>
                    </div>
                </div>
                <div class="am-u-lg-3 am-u-md-6 am-u-sm-12" title="点击查看详情">
                    <div class="dashboard-stat green">
                        <div class="visual">
                            <i class="am-icon-apple"></i>
                        </div>
                        <div class="details">
                            <div class="number"><font style="font-size: 30px;">已完成</font> ${empty postTotalRate.rate ? '0':postTotalRate.rate}% </div>
                            <div class="desc"> 护林员岗位扶贫 </div>
                        </div>
                        <a class="more" href="${ctx }/gt/gtPost?menuId=post"> 查看详细
                    	<i class="m-icon-swapright m-icon-white"></i>
                		</a>
                	</div>
                </div>
                <div class="am-u-lg-3 am-u-md-6 am-u-sm-12" title="点击查看详情">
                    <div class="dashboard-stat purple">
                        <div class="visual">
                            <i class="am-icon-android"></i>
                        </div>
                        <div class="details">
                            <div class="number"><font style="font-size: 30px;">已完成</font> ${empty companyTotalRate.rate ? '0':companyTotalRate.rate}% </div>
                            <div class="desc"> 林业企业（合作社）扶贫 </div>
                        </div>
                        <a class="more" href="${ctx }/gt/gtCompany?menuId=company"> 查看详细
	                    <i class="m-icon-swapright m-icon-white"></i>
	                	</a>
                   </div>
                </div>
            </div>

            <div class="row">
                <!-- <div class="am-u-md-6 am-u-sm-12 row-mb">
                    <div class="tpl-portlet">
                        <div class="tpl-portlet-title">
                            <div class="tpl-caption font-green ">
                                <i class="am-icon-cloud-download"></i>
                                <span> 总体完成进度数据统计(%)</span>
                            </div>
                        </div>

                        此部分数据请在 js文件夹下中的 app.js 中的 “百度图表A” 处修改数据 插件使用的是 百度echarts
                        <div class="tpl-echarts" id="tpl-echarts-A">

                        </div>
                    </div>
                </div> -->

               
                <div  class="am-u-md-12 am-u-sm-12 row-mb">
                    <div class="tpl-portlet">
                        <div class="tpl-portlet-title">
                            <div class="tpl-caption font-red ">
                                 <i class="am-icon-bar-chart"></i>
                                <span> 各${fns:getUser().area.type eq 2?'地市':fns:getUser().area.type eq 3?'区县':fns:getUser().area.type eq 4?'乡镇':'村'}扶贫进度统计</span>
                            	<!-- <input type="button" value = "导出excel"/> -->
                            	<!-- &nbsp;<a href="#" onclick="exportInfo();"><b>导出excel</b></a> -->
                            	
                            	
                            	<span id="tip" style="margin-left: 200px;display: none;">
									<img style="width: 35px;height: 35px;" src="${ctxStatic }/sdlyfp/img/loading.gif">
									<font color="red"><b>正在导出，请耐心等待...</b></font>
								</span>
				
                            </div>
                        </div>

                        <div class="am-tabs tpl-index-tabs" data-am-tabs>
                            <%-- <ul class="am-tabs-nav am-nav am-nav-tabs" style="width:80%; margin-left:20%">
								<table width="100%" style="text-align:center;   font-size:14px; line-height:40px">
								<tr>
								<td width="14%"><li class="am-active" > 经济林面积(亩) </li></td>                                 
	                               <td  width="12%"> <li class="am-active" > 经济林人数 </li></td> 
	                                <td  width="12%"><li class="am-active"> 护林员岗位人数 </li></td> 
	                                <td  width="14%"><li class="am-active"> 企业（合作社）数量 </li></td>
	                                <td  width="12%"><li class="am-active"> 
	                                	<c:if test="${fns:getUser().area.type eq 2}">
	                                	市科技下乡次数
	                                	</c:if>
	                                	<c:if test="${fns:getUser().area.type eq 3}">
	                                	县科技下乡覆盖村数
	                                	</c:if>
	                                	<c:if test="${fns:getUser().area.type gt 3}">
	                                	技下乡覆盖村数
	                                	</c:if>
	                                	
	                                </li></td>
	                                
	                                <c:if test="${fns:getUser().area.type eq 2}">
	                                	<td><li class="am-active"> 县科技下乡覆盖村数</li></td>
	                                </c:if>
	                                
	                                <td  width="12%"><li class="am-active"> 县技术专家人数 </li></td> 
	                                <td  width="12%"><li class="am-active"> 乡镇技术员人数 </li></td> 
	                                <td  width="12%"><li class="am-active"> 村技术明白人数 </li></td> 
								</tr>
								</table>
                            </ul> --%>

                            <div class="am-tabs-bd">
                                <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                                    <div id="wrapperA" class="wrapper" style="height: 680px;">
                                        <div id="scroller" class="scroller">
                                        
                                        
                                            <ul class="tpl-task-list tpl-task-remind">
                                                <li>
												<table width="100%" style="text-align:center;   font-size:14px; line-height:20px">											
												<thead>
												<td> 单位</td>
												<td>经济林面积(亩)</td>                                 
					                               <td> 经济林人数 </td> 
					                                <td> 护林员岗位人数 </td> 
					                                <td>企业（合作社）数量</td>
					                                <td>
					                                	<c:if test="${fns:getUser().area.type eq 2}">
					                                	市科技下乡次数
					                                	</c:if>
					                                	<c:if test="${fns:getUser().area.type eq 3}">
					                                	县科技下乡覆盖村数
					                                	</c:if>
					                                	<c:if test="${fns:getUser().area.type gt 3}">
					                                	科技下乡覆盖村数
					                                	</c:if>
					                                </td>
					                                
					                                <c:if test="${fns:getUser().area.type eq 2}">
					                                	<td><li class="am-active"> 县科技下乡覆盖村数</li></td>
					                                </c:if>
					                                
					                                <td>县技术专家人数</td>
					                                <td>乡镇技术员人数 </td> 
					                                <td> 村技术明白人数 </td> 
												</thead>
												
												<c:forEach items="${fpRegionAllRateList }" var="fpRate">
												<tr>
													
													<td style="text-align:left">
														<div class="cosA" style="margin-right: 0">
	                                                        <span class="cosIco label-danger" style="line-height:24px"><i class="am-icon-bolt"></i></span>
	                                                        
	                                                        <c:if test="${fns:getUser().area.type lt 3}">
	                                                        	<span> <a title="点击查看${fpRate.name }进度" href="#" onclick="openWin('${ctx }/gt/gtAnalysis/subRate?menuId=overAll&code=${fpRate.code }','${fpRate.name }工作进度',1500,800)">${fpRate.name }</a></span>
	                                                        </c:if>
	                                                        <c:if test="${fns:getUser().area.type gt 2}">
	                                                        	<span> ${fpRate.name }</span>
	                                                        </c:if>
			                                                        
			                                            </div>
													</td>
														<td  title="经济林完成面积(亩)">${fpRate.realArea }(${fpRate.forestRate}%)</td>                                 
													    <td  title="经济林带动人数"> ${fpRate.realForestPeople }(${fpRate.forestPeopleRate}%)</td> 
														<td  title="护林员岗位人数">
															<c:if test="${fpRate.code eq 'sd.dy' || fpRate.code eq 'sd.dz' || fpRate.code eq 'sd.hz'}">
																${fpRate.realPostPeople}(----)
															</c:if>
															<c:if test="${fpRate.code ne 'sd.dy' && fpRate.code ne 'sd.dz' && fpRate.code ne 'sd.hz'}">
																${fpRate.realPostPeople}(${fpRate.postRate}%)
															</c:if>
															
														</td> 
														<td  title="龙头企业(合作社)数量">${fpRate.realCompany}(${fpRate.companyRate}%)</td> 
														<td  title="科技下乡数量">${fpRate.real}(${fpRate.countryRate}%)</td> 
														
														<c:if test="${fns:getUser().area.type eq 2}">
						                                	<td  title="县科技下乡覆盖村数">${fpRate.countryCoverReal}(${fpRate.countryCoverRate}%)</td> 
						                                </c:if>
														
														<td  title="县技术专家人数">${fpRate.realClear}(${fpRate.clearRate}%)</td> 
														<td  title="乡镇技术员人数">${fpRate.realTownClear}(${fpRate.clearTownRate}%) </td> 
														<td  title="村技术明白人">${fpRate.realCountryClear}(${fpRate.clearCountryRate}%) </td> 
                                               </tr>
                                               </c:forEach>
                                               </table>	
	                                          </li>
                                              
                                                
                                            </ul>
                                            
                                            
                                            
                                            
                                        </div>
                                    </div>
                                </div>
                                <!-- <div class="am-tab-panel am-fade" id="tab2">
                                    <div id="wrapperB" class="wrapper">
                                        <div id="scroller" class="scroller">
                                             
                                        </div>
                                    </div>
                                </div> -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            <div class="row"> 
                <div class="am-u-md-6 am-u-sm-12 row-mb">
                    <div class="tpl-portlet">
                        <div class="tpl-portlet-title">
                            <div class="tpl-caption font-green ">
                                <span>工作月报</span>
                                <span class="caption-helper">${fn:length(workReportList)} 件</span>
                            </div>
                            <div class="tpl-portlet-input">
                                    <div class="input-icon right"><A href="${ctx }/gt/gtWorkReport?menuId=report">更多</A></div>
                            </div>
                        </div>
                        <div id="wrapper" class="wrapper"> 
                            <div id="scroller" class="scroller"> 
                                <ul class="tpl-task-list">  
                                   <!--  <li>
                                        <div class="task-title">
                                            <a href="ybview.html"><span class="task-title-sp"> 济南市林业局3月份月报</span></a>
                                            <span class="label label-sm label-success">经办人</span>
                                        </div>
                                    </li> -->
									<c:forEach items="${workReportList}" var="workReport">
										<li>
	                                        <div class="task-title">
	                                            <a href="${ctx }/gt/gtWorkReport/form?id=${workReport.id }&oper=view&menuId=report">
	                                            <span class="task-title-sp" title="${workReport.name}"> <fmt:formatDate value="${workReport.month}" pattern="yyyy年MM"/>月报</span></a>
	                                            <span class="label label-sm label-success">${workReport.area.name}</span>
	                                        </div>
	                                    </li>
                                    </c:forEach>
                                    
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="am-u-md-6 am-u-sm-12 row-mb">
                    <div class="tpl-portlet">
                        <div class="tpl-portlet-title">
                            <div class="tpl-caption font-green ">
                                <span>信息宣传</span>
                            </div>
							<div class="tpl-portlet-input">
                                    <div class="input-icon right"><A href="${ctx }/gt/gtInfoDeliver?menuId=deliver">更多</A></div>
                            </div>
                        </div>

                        <div class="am-tabs tpl-index-tabs" data-am-tabs>
                            <div class="am-tabs-bd">
                                <div class="am-tab-panel am-fade am-in am-active">
                                    <div id="wrapperB" class="wrapper">
                                        <div id="scroller" class="scroller">
                                            <ul class="tpl-task-list tpl-task-remind">
                                            
                                                <!-- <li><div class="cosB">3-23 </div>
                                                    <div class="cosA">
                                                        <span class="cosIco"> <i class="am-icon-bell-o"></i></span>
                                                        <span> <A href="xcview.html">临沂市召开全市春季造林绿化会议。</A>
	                                                        <span class="tpl-label-info"> 
	                                                        	提取文件
	                                                            <i class="am-icon-share"></i>
	                                                        </span>
                                                        </span>
                                                    </div>
                                                </li> -->
                                                <c:forEach items="${infoList }" var="infoDeliver">
												<li>
													<div class="cosB" style="width: auto;">
														<fmt:formatDate value="${infoDeliver.deliverTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
													</div>
                                                    <div class="cosA">
                                                        <span class="cosIco"> <i class="am-icon-bell-o"></i>  </span>
                                                        <span> 
                                                        	<A href="${ctx }/gt/gtInfoDeliver/form?id=${infoDeliver.id }&oper=view&menuId=deliver" title="${infoDeliver.name }">
                                                        		<c:if test="${fn:length(infoDeliver.name) > 20}">
																	${fn:substring(infoDeliver.name,0,20)}...
																</c:if>
																<c:if test="${fn:length(infoDeliver.name) < 21}">
																	${infoDeliver.name}
																</c:if>
                                                        	</A>
                                                        	<%-- <c:if test="${not empty infoDeliver.filePath }">
	                                                        	<a target="_blank" href="${infoDeliver.filePath }">
			                                                        <span class="tpl-label-info"> 提取文件${infoDeliver.filePath }
			                                                            <i class="am-icon-share"></i>
			                                                        </span>
		                                                        </a>
	                                                        </c:if> --%>
                                                        </span>
                                                        <span class="label label-sm label-success">
                                                        <!-- 本级单位为县级以下时，展示父级单位 -->
                                                        <c:if test="${infoDeliver.area.type gt 3}">
                                                        
                                                        	${infoDeliver.area.parent.name}
                                                        	${infoDeliver.area.name}
                                                        </c:if>
                                                        <!--  -->
                                                        <c:if test="${infoDeliver.area.type lt 4}">
                                                        	${infoDeliver.area.name}
                                                        </c:if>
                                                        
                                                        </span>
                                                    </div>
                                                </li>
                                                </c:forEach>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                

                            </div>
                        </div>

                    </div>
                </div>
            </div> 



        </div> 

    </div>


    <script src="${ctxStatic}/sdlyfp/js/jquery.min.js"></script>
    <script src="${ctxStatic}/sdlyfp/js/amazeui.min.js"></script>
    <script src="${ctxStatic}/sdlyfp/js/iscroll.js"></script>
    <script src="${ctxStatic}/sdlyfp/js/app.js"></script>
	<script>
	$(function(){
		// $(".tpl-left-nav-menu").find("li a").eq(0).addClass("active");
		
		var menuId = '${menuId }';
		if(menuId)
		{
			$(".tpl-left-nav-menu").find("#"+menuId).addClass("active");
		}
		
		/* <c:if test="${fns:getUser().area.type gt 2}"> */
		var areaId = '${fns:getUser().area.id}';
		var areaName = '${fns:getUser().area.name}';
		var forestArea = '${fns:getUser().area.forestArea}';
		var forestPeople = '${fns:getUser().area.forestPeople}';
		var rangerPost = '${fns:getUser().area.rangerPost}';
		var leadCompany = '${fns:getUser().area.leadCompany}';
		var coop = '${fns:getUser().area.coop}';
		var countryTotal = '${fns:getUser().area.countryTotal}';
		
		var tipTitle = "您所在的单位'" + areaName + "'下的";
		var tipBody = "";
		if(!forestArea)
		{
			if("" == tipBody)
			{
				tipBody = "'经济林任务目标'";
			}
			else
			{
				tipBody += ",'经济林任务目标'";
			}
		}
		if(!forestPeople)
		{
			if("" == tipBody)
			{
				tipBody = "'经济林帮扶带动人口任务目标'";
			}
			else
			{
				tipBody += ",'经济林帮扶带动人口任务目标'";
			}
		}
		if(!rangerPost)
		{
			if("" == tipBody)
			{
				tipBody = "'护林岗位任务目标'";
			}
			else
			{
				tipBody += ",'护林岗位任务目标'";
			}
		}
		if(!leadCompany)
		{
			if("" == tipBody)
			{
				tipBody += "'龙头企业任务目标'";
			}
			else
			{
				tipBody = ",'龙头企业任务目标'";
			}
		}
		if(!coop)
		{
			if("" == tipBody)
			{
				tipBody = "'合作社任务目标'";
			}
			else
			{
				tipBody += ",'合作社任务目标'";
			}
		}
		
		if(!countryTotal)
		{
			if("" == tipBody)
			{
				tipBody = "'贫困村任务目标'";
			}
			else
			{
				tipBody += ",'贫困村任务目标'";
			}
		}
		
		if(tipBody != "")
		{
			// alertMsg(tipTitle + tipBody + "没有配置，对于确认没有任务目标的项，可配置为0，配置后该信息不再提示。","warning");
			comfirmMsg(tipTitle + tipBody + "没有配置，没有配置的项统计进度将为0，对于确认没有任务目标的项，可配置为0，配置后该信息不再提示。",
			"${ctx }/gt/area/form?id=" + areaId + "&menuId=area","","","去配置","下次再说");
		}
		/* </c:if> */
		
	})
	
	var message = "${message}";
	if(message)
	{
		var messageType = "${messageType}";
		msg(message,3000,messageType);
	}
	
	
	
	// 页面数据
	var pageData = {
    // ===============================================
    // 首页
    // ===============================================
    'index': function indexData() {
    	
    	var myScroll = new IScroll('#wrapper', {
            scrollbars: true,
            mouseWheel: true,
            interactiveScrollbars: true,
            shrinkScrollbars: 'scale',
            preventDefault: false,
            fadeScrollbars: true
        });

        var myScrollA = new IScroll('#wrapperA', {
            scrollbars: true,
            mouseWheel: true,
            interactiveScrollbars: true,
            shrinkScrollbars: 'scale',
            preventDefault: false,
            fadeScrollbars: true
        });

        var myScrollB = new IScroll('#wrapperB', {
            scrollbars: true,
            mouseWheel: true,
            interactiveScrollbars: true,
            shrinkScrollbars: 'scale',
            preventDefault: false,
            fadeScrollbars: true
        });


        var myScrollA = new IScroll('#wrapperA', {
            scrollbars: true,
            mouseWheel: true,
            interactiveScrollbars: true,
            shrinkScrollbars: 'scale',
            preventDefault: false,
            fadeScrollbars: true
        });

         
        var echartsA = echarts.init(document.getElementById('tpl-echarts-A'));
        option = {

            tooltip: {
                trigger: 'axis',
            },
             
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: [{
                type: 'category',
                boundaryGap: true,
                data: ['经济林面积', '经济林人数', '护林员岗位', '企社' ]
            }],

            yAxis: [{
            	name: '进度',
            	type: 'value',
                axisLabel: {
                    formatter: '{value}(%)'
                }
            }],
            series: [
            	{
                    name: '完成百分比',
                    type: 'bar',
                    barGap:0,
                    data: ['${forestTotalRate.forestRate }', '${forestTotalRate.peopleRate }', '${postTotalRate.rate }', '${companyTotalRate.rate }' ],
                    itemStyle: {
                        normal: {
                            color: '#ff6600'
                        }
                    }

                }/* ,
                {
                    name: '人数完成百分比',
                    type: 'bar',
                    barGap:0,
                    data: [20, 49, 75, 88 ],
                    itemStyle: {
                        normal: {
                            color: '#32c5d2'
                        }
                    }
                   
                } */
            ]
        };
        echartsA.setOption(option);
    }
    // ===============================================
    // 图表页
    // ===============================================
     
    }
	
	// add by zad 首页导出
	function exportInfo()
	{
		comfirmMsg("您确定要导出吗？",down,'${ctxAdmin }/downLoad',"");
	}
	function down(url)
	{
		//$(".hdm").parent().attr("disabled",true);
		$("#tip").show();
		var timeStamp = new Date().getTime();
		$("#downloadIframe").attr("src",url + "?timeStamp=" + timeStamp.toString())
		
		var interVal = setInterval(function(){
			var downToken = getCookie('downToken');
			if(downToken == timeStamp)
			{
				clearInterval(interVal);
				$("#tip").hide();
				
				$(".hdm").parent().attr("disabled",false);
			}
		},200);	
	}
	</script>
	<iframe id="downloadIframe" src="" style="display:none;" />
</body>
</html>